import server from "../utils/request.js";
export function Login(data){
    return server({
        url:"/user/login",
        method:"post",
        data:{
            phoneNum: data.phone,
            password: data.password
        }
    })
}

export function register(data){
    return server({
        url:"/user/registerAdminOrDoctor",
        method:"post",
        data:{
            phoneNum: data.phone,
            password: data.password,
            code: data.code,
            roleId: data.roleId
        }
    })
}

export function sendCode(phoneNum){
    return server({
        url:`/code/sendCode/${phoneNum}`,
        method:"post"
    })
}